<template>
  <div>
    <div v-if="!isShow" @click="connectWallet" style="position: relative;display: flex">
      <div class="loginbox">Sign in to show details</div>
    </div>
  </div>
</template>
<script>
import {mapActions, mapState} from "vuex"

export default {
  data() {
    return {
      signer: null,
      ethersProvider: null,
      usdtAddress: "0xdAC17F958D2ee523a2206206994597C13D831ec7", // 以太坊 USDT 合约地址
      usdtABI: [
        "function balanceOf(address owner) view returns (uint256)",
        "function transfer(address to, uint amount) returns (bool)",
      ],
      code: ''
    }
  },
  mounted() {
  },
  computed: {
    ...mapState('user', ['address', 'isShow'])
  },
  methods: {
    ...mapActions('user', ['setaddress']),
    connectWallet() {
      this.$onboard.connectWallet()
    }
  }
}
</script>
<style scoped>
.loginbox {

  border-radius: 9999px;
  border: 1px solid transparent;
  --tw-bg-opacity: 1;
  background-color: rgb(22, 178, 242);
  padding: 4px 6.5px;
  font-size: .75rem;
  line-height: 1rem;
  font-weight: 700;
  --tw-text-opacity: 1;
  margin-left: 10px;
  color: rgb(255, 255, 255);
  transition-timing-function: cubic-bezier(.4, 0, .2, 1);
  transition-duration: .15s;
  position: relative;
  //z-index: 999;
}
</style>